define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'merchant.settlement/index',
        add_url: 'merchant.settlement/add',
        edit_url: 'merchant.settlement/edit',
        delete_url: 'merchant.settlement/delete',
        export_url: 'merchant.settlement/export',
        modify_url: 'merchant.settlement/modify',
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                toolbar: ['refresh'],
                cols: [[
                    {field: 'id', title: 'id', search: false},
                    {field: 'nickname', title: '用户昵称', search: false},
                    {field: 'call', title: '称呼'},
                    {field: 'phone', title: '联系电话'},
                    {field: 'wechat', title: '微信号'},
                    {field: 'settle_inthecity', title: '入驻城市', search: false},
                    {field: 'create_time', title: '申请时间', search: false},
                    //{width: 250, title: '操作', templet: ea.table.tool},

                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});